using System;
using System.Collections.Generic;
using System.Linq;
using Granite.Xaml.Converters;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Granite.Xaml.Tests.Converters
{
	[TestClass]
	public class NotNullToTrueConverterTests : ConverterTest<NotNullToTrueConverter>
	{

		[TestMethod]
		public void NotNullToTrueConverter_Test()
		{
			Convert<bool>(false, null);
			Convert<bool>(true, 0);
			Convert<bool>(true, "");

			Convert<bool?>(false, null);
			Convert<bool?>(true, 0);
			Convert<bool?>(true, "");

			BadTargetType<int>();
			BadTargetType<string>();

			NoConvertBack();
		}
	}
}
